<html>

<head>
<title>RCP Perspective Wizard</title>
<link href="../../../book.css" rel="stylesheet" type="text/css">
</head>

<body>

<h1>RCP Perspective Wizard</h1>

<table border="0" cellpadding="0" cellspacing="0" width="800">
  <tr>
    <td>
		<img src="images/wizard_rcp_perspective0.gif" align="left" hspace="10">Implementors of the Eclipse RCP <b>
			IPerspectiveFactory</b> interface can be
              created using the <b>RCP Perspective </b>wizard. The wizard can be
              selected from the drop down Designer wizard menu or from the
              Eclipse <b>New</b> wizard.
              <p>To use the wizard, select the project source folder and package
              to contain the class. Then enter the class name and editor name and hit the <b>Finish</b>
              button.<p>&nbsp;</td>
  </tr>
  <tr>
    <td>
		<br>
		<img src="images/wizard_rcp_perspective1.gif" width="347" height="385">&nbsp;
      <img src="images/wizard_rcp_perspective2.gif" width="347" height="385"></td>
  </tr>
  <tr>
    <td>
    <p><br>
	The wizard generates the following code.</p>
      <blockquote>
              <dl>
                <dt><font face="Courier" size="2" color="#7f0055"><b>import</b></font><font face="Courier New" size="2"> org.eclipse.ui.IPageLayout;<br>
				</font><font face="Courier" size="2" color="#7f0055"><b>import</b></font><font face="Courier New" size="2"> org.eclipse.ui.IPerspectiveFactory;<br>
				<br>
				</font><font face="Courier" size="2" color="#7f0055"><b>public class</b></font><font face="Courier New" size="2"> SamplePerspective </font>
				<font face="Courier" size="2" color="#7f0055"><b>implements</b></font><font face="Courier New" size="2"> IPerspectiveFactory {<br>
&nbsp;&nbsp;&nbsp; </font><font face="Courier" size="2" color="#7f0055"><b>public void</b></font><font face="Courier New" size="2"> createInitialLayout(IPageLayout layout) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String editorArea = 
				layout.getEditorArea();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addFastViews(layout);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addViewShortcuts(layout);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addPerspectiveShortcuts(layout);<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; </font><font face="Courier" size="2" color="#7f0055"><b>private void
				</b></font><font face="Courier New" size="2">addFastViews(IPageLayout layout) {<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; </font><font face="Courier" size="2" color="#7f0055"><b>private void
				</b></font><font face="Courier New" size="2">addViewShortcuts(IPageLayout layout) {<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; </font><font face="Courier" size="2" color="#7f0055"><b>private void
				</b></font><font face="Courier New" size="2">addPerspectiveShortcuts(IPageLayout layout) {<br>
&nbsp;&nbsp;&nbsp; }<br>
				}&nbsp;&nbsp;&nbsp; </font></dt>
              </dl>
      </blockquote>
      <p>If the Perspective is created in an existing plugin project, the 
		plugin.xml file is also updated with the appropriate perspective declaration.</p>
	<p>
		<img border="0" src="images/wizard_rcp_perspective3.gif"></p>
	<p>Perspectives use their own unique palette. The first palette category, 
	Local, contains a list of all of the views defined in the local plugin.xml 
	file. Additional categories, such as Standard, Java, Debug and Misc, contain 
	common views frequently used in perspectives. The actual categories shown 
	will depend on prerequisite plugins defined by the current plugin (i.e., the 
	Java category will only appear is the Eclipse JDT plugins are prerequisites 
	of the current plugin. The last category, Perspectives, lists all of the 
	perspectives available in the system.</p>
	<p>
		<img border="0" src="images/wizard_rcp_perspective4.gif"></p>
	<p>Views may be dragged and dropped within the design area. Dropping one 
	view on another will automatically create a folder. Views may be set as 
	placeholders or dragged to the fast view dock at the bottom of the 
	perspective or to the view shortcut dock to the right of the perspective. 
	Perspectives may only be dragged to the perspective shortcut doc to the 
	right of the perspective.</p>
      <p>
		<img src="images/wizard_rcp_perspective5.gif" align="top">&nbsp;
		<img src="images/wizard_rcp_perspective7.gif" align="top"><br>
		<img src="images/wizard_rcp_perspective6.gif" align="top">&nbsp;
		<img src="images/wizard_rcp_perspective8.gif" align="top"></p>
    <p>When the Perspective itself is selected in the property pane, its icon and 
	name may be edited.<p>
		<img border="0" src="images/wizard_rcp_perspective9.gif" align="top">
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
